<template>
  <div >  

    <el-form ref="form" :model="sysUser" label-width="80px">
      <el-form-item label="用户名">
        <el-input v-model="sysUser.username"></el-input>
      </el-form-item>
 
  
      <el-form-item label="密码">
        <el-input v-model="sysUser.password"></el-input>
      </el-form-item>
 
  
      <el-form-item label="邮件">
        <el-input v-model="sysUser.email"></el-input>
      </el-form-item>
 
  
      <el-form-item label="icon">
        <el-input v-model="sysUser.icon"></el-input>
      </el-form-item>
 
  
      <el-form-item>
        <el-button type="primary" @click="onSubmit">立即创建</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
    

  </div>
</template>

 

<script> 
  import {saveSysUser} from '@/api/study'
export default {
  data() {
      return {
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        },
        sysUser:{
          id:'',
          username:'admin',
          password:'',
          icon:"ddd",
          email:"",
        }
      }
    },
    methods: {
      onSubmit() {
        console.log(this.sysUser);
        saveSysUser(this.sysUser).then(response => {
          console.log(response)
        })


 
         

      }
    }
}
</script>